package org.turnlink.sclm.model;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import com.thoughtworks.xstream.annotations.XStreamAlias;
/**
 * AccountSession entity. @author MyEclipse Persistence Tools
 */
@XStreamAlias("accountSession")
@Entity
@Table(name = "account_session", catalog = "turnlink")
public class AccountSession implements java.io.Serializable {

	// Fields    

	private Integer accountId;
	private String token;
	private Timestamp tokenCreation;

	// Constructors

	/** default constructor */
	public AccountSession() {
	}

	/** minimal constructor */
	public AccountSession(Integer accountId, Timestamp tokenCreation) {
		this.accountId = accountId;
		this.tokenCreation = tokenCreation;
	}

	/** full constructor */
	public AccountSession(Integer accountId, String token, Timestamp tokenCreation) {
		this.accountId = accountId;
		this.token = token;
		this.tokenCreation = tokenCreation;
	}

	// Property accessors
	@Id
	@Column(name = "account_id", unique = true, nullable = false)
	public Integer getAccountId() {
		return this.accountId;
	}

	public void setAccountId(Integer accountId) {
		this.accountId = accountId;
	}

	@Column(name = "token", length = 40)
	public String getToken() {
		return this.token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	@Column(name = "token_creation", nullable = false, length = 19)
	public Timestamp getTokenCreation() {
		return this.tokenCreation;
	}

	public void setTokenCreation(Timestamp tokenCreation) {
		this.tokenCreation = tokenCreation;
	}

}